package com.zzk.protect.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 
 * @TableName drug
 */
@TableName(value ="drug")
public class Drug {
    /**
     * Primary key ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * Drug code
     */
    @TableField(value = "code")
    private String code;

    /**
     * Drug name
     */
    @TableField(value = "name")
    private String name;

    /**
     * Drug specification
     */
    @TableField(value = "specification")
    private String specification;

    /**
     * Package unit
     */
    @TableField(value = "unit")
    private String unit;

    /**
     * Manufacturer
     */
    @TableField(value = "manufacturer")
    private String manufacturer;

    /**
     * Dosage form ID
     */
    @TableField(value = "dosage_form_id")
    private Integer dosageFormId;

    /**
     * Drug type ID
     */
    @TableField(value = "type_id")
    private Integer typeId;

    /**
     * Unit price
     */
    @TableField(value = "price")
    private BigDecimal price;

    /**
     * Mnemonic code
     */
    @TableField(value = "mnemonic_code")
    private String mnemonicCode;

    /**
     * Creation time
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * Last update time
     */
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * Delete flag
     */
    @TableField(value = "is_deleted")
    private Integer isDeleted;

    /**
     * Primary key ID
     */
    public Integer getId() {
        return id;
    }

    /**
     * Primary key ID
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * Drug code
     */
    public String getCode() {
        return code;
    }

    /**
     * Drug code
     */
    public void setCode(String code) {
        this.code = code;
    }

    /**
     * Drug name
     */
    public String getName() {
        return name;
    }

    /**
     * Drug name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * Drug specification
     */
    public String getSpecification() {
        return specification;
    }

    /**
     * Drug specification
     */
    public void setSpecification(String specification) {
        this.specification = specification;
    }

    /**
     * Package unit
     */
    public String getUnit() {
        return unit;
    }

    /**
     * Package unit
     */
    public void setUnit(String unit) {
        this.unit = unit;
    }

    /**
     * Manufacturer
     */
    public String getManufacturer() {
        return manufacturer;
    }

    /**
     * Manufacturer
     */
    public void setManufacturer(String manufacturer) {
        this.manufacturer = manufacturer;
    }

    /**
     * Dosage form ID
     */
    public Integer getDosageFormId() {
        return dosageFormId;
    }

    /**
     * Dosage form ID
     */
    public void setDosageFormId(Integer dosageFormId) {
        this.dosageFormId = dosageFormId;
    }

    /**
     * Drug type ID
     */
    public Integer getTypeId() {
        return typeId;
    }

    /**
     * Drug type ID
     */
    public void setTypeId(Integer typeId) {
        this.typeId = typeId;
    }

    /**
     * Unit price
     */
    public BigDecimal getPrice() {
        return price;
    }

    /**
     * Unit price
     */
    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    /**
     * Mnemonic code
     */
    public String getMnemonicCode() {
        return mnemonicCode;
    }

    /**
     * Mnemonic code
     */
    public void setMnemonicCode(String mnemonicCode) {
        this.mnemonicCode = mnemonicCode;
    }

    /**
     * Creation time
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * Creation time
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * Last update time
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * Last update time
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * Delete flag
     */
    public Integer getIsDeleted() {
        return isDeleted;
    }

    /**
     * Delete flag
     */
    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Drug other = (Drug) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getSpecification() == null ? other.getSpecification() == null : this.getSpecification().equals(other.getSpecification()))
            && (this.getUnit() == null ? other.getUnit() == null : this.getUnit().equals(other.getUnit()))
            && (this.getManufacturer() == null ? other.getManufacturer() == null : this.getManufacturer().equals(other.getManufacturer()))
            && (this.getDosageFormId() == null ? other.getDosageFormId() == null : this.getDosageFormId().equals(other.getDosageFormId()))
            && (this.getTypeId() == null ? other.getTypeId() == null : this.getTypeId().equals(other.getTypeId()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getMnemonicCode() == null ? other.getMnemonicCode() == null : this.getMnemonicCode().equals(other.getMnemonicCode()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getSpecification() == null) ? 0 : getSpecification().hashCode());
        result = prime * result + ((getUnit() == null) ? 0 : getUnit().hashCode());
        result = prime * result + ((getManufacturer() == null) ? 0 : getManufacturer().hashCode());
        result = prime * result + ((getDosageFormId() == null) ? 0 : getDosageFormId().hashCode());
        result = prime * result + ((getTypeId() == null) ? 0 : getTypeId().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getMnemonicCode() == null) ? 0 : getMnemonicCode().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", code=").append(code);
        sb.append(", name=").append(name);
        sb.append(", specification=").append(specification);
        sb.append(", unit=").append(unit);
        sb.append(", manufacturer=").append(manufacturer);
        sb.append(", dosageFormId=").append(dosageFormId);
        sb.append(", typeId=").append(typeId);
        sb.append(", price=").append(price);
        sb.append(", mnemonicCode=").append(mnemonicCode);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append("]");
        return sb.toString();
    }
}